import { defHttp } from '/@/utils/http/axios';

const Api = {
  Articles: '/blog/articles',
  Categories: '/blog/categories',
};

/**
 * 获取公开文章列表
 */
export const getPublicArticles = (params: any) => {
  return defHttp.get({
    url: `${Api.Articles}/public/list`,
    params,
  });
};

/**
 * 获取公开文章详情
 */
export const getPublicArticleDetail = (id: string) => {
  return defHttp.get({
    url: `${Api.Articles}/public/detail`,
    params: { id },
  });
};

/**
 * 获取文章分类列表
 */
export const getArticleCategories = () => {
  return defHttp.get({
    url: `${Api.Categories}/public/list`,
  });
}; 